# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libutempter
pkgver=1.2.1
pkgrel=3
pkgdesc="Interface for terminal emulators such as screen and xterm to record user sessions to utmp and wtmp files"
arch=('x86_64')
url="http://ftp.altlinux.org/pub/people/ldv/utempter"
license=('LGPL')
depends=('glibc')
makedepends=('systemd')
source=(http://ftp.altlinux.org/pub/people/ldv/utempter/$pkgname-$pkgver.tar.gz{,.asc})
sha512sums=('d3a3bab7d2c2a68534c5ad41dd02bde849eb08df5dbb895a79b50b74d269c48c4cfcd12c4654941ccb7cdd43f486cfdc19148fa470870562f5cd324ce9782429'
            'SKIP')
validpgpkeys=(296D6F29A020808E8717A8842DB5BD89A340AEB7) # Dmitry V. Levin <ldv@altlinux.org>

build() {
  cd $pkgname-$pkgver
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  echo 'z /usr/lib/utempter/utempter 2755 root utmp' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}
